﻿@using PartyCraftServer;
@using PartyCraftServer.Web;
@using LibMinecraft.Model;
@using LibMinecraft.Server;
@using System.Web;
@{
    Model.ViewBag["user"] = Model.GetUser();
}
@if (@Model.GetUser() == null)
{
    Model.Redirect("/");
    return;
}
<!doctype html>
<html>
<head>
    <title>@PartyCraft.CurrentServer.MotD</title>
    <link rel="stylesheet" type="text/css" href="/css/home.css" />
    <link rel="Stylesheet" type="text/css" href="/css/jquery-ui.css" />
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script>
    <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.min.js" type="text/javascript"></script>
    <script type="text/javascript" src="/js/home.js"></script>
</head>
<body>
    <div id="sidebar">
        @Model.RenderRazor("SidebarRazor")
    </div>
    <div id="content">
        <img id="logo" src="/images/partycraft-small.png" />
        <a class="h1link" href="http://partycraft.codeplex.com">
            <h1>PartyCraft</h1>
        </a>
        <div id="motd" class="motd-value">@PartyCraft.CurrentServer.MotD</div>
        <div id="right-box">
            <div id="connected-players" class="players-value">@PartyCraft.Server.GetLoggedInClients().Count()/@PartyCraft.CurrentServer.MaxPlayers Online</div>
        </div>
        <div class="clearfix"></div>
        <div id="alert-wrapper">
        @if (PartyCraft.Settings.GetBoolean("server.debugenabled"))
        {
            <div class="alert-warning">This server is currently running in debug mode, which is less secure and may cause slowdowns.  <a href="/api/setsetting?key=server.debugenabled&value=false" class="post-to close-link">Click here</a> to disable debug mode.<a class="close-link float-right" href="#">(Click to Dismiss)</a></div>
        }
        @if (!PartyCraft.Settings.GetBoolean("server.onlinemode"))
        {
            <div class="alert-warning">This server is currently running in offline mode, which is significantly less secure.  <a href="/api/setsetting?key=server.onlinemode&value=true" class="post-to close-link">Click here</a> to switch to online mode.<a class="close-link float-right" href="#">(Click to Dismiss)</a></div>
        }
        </div>
        <div class="content-box">
            <div class="content-box-title"><h3>Server Overview</h3></div>
            <div class="content-box-contents">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut blandit pellentesque lectus gravida interdum. Aenean tincidunt congue leo at consequat. Quisque ac lectus in odio placerat tincidunt. Fusce condimentum sollicitudin nulla eget dignissim. Nam scelerisque iaculis odio, sit amet accumsan ante auctor ut. Sed imperdiet, nunc a auctor hendrerit, tellus justo consectetur diam, a ultricies nulla mi ut diam. Vestibulum porttitor imperdiet lacus in vestibulum. Nullam a eros felis, ac sagittis eros. Suspendisse potenti.</p>
<p>Fusce nec mauris orci. Cras enim leo, lacinia sit amet rutrum venenatis, imperdiet nec turpis. Nullam ipsum tortor, hendrerit mollis tempus id, convallis vitae mi. Vestibulum ornare gravida lacus, at dapibus lectus tempor non. Cras tempus iaculis vehicula. Integer ut justo nec enim porta viverra. Maecenas lobortis neque nec justo consequat commodo. Mauris non justo eros, suscipit imperdiet nisl. Morbi a odio dui. Nullam et leo ante. In vitae ullamcorper risus. Nulla condimentum, elit eu iaculis dapibus, odio neque eleifend ligula, a tincidunt urna elit ut ligula. Mauris mi ipsum, tempus ut luctus non, laoreet at tortor. Ut erat eros, lacinia quis rutrum at, mollis id ligula. Sed consequat, dui eget congue mattis, dolor nibh consectetur arcu, eget egestas nisl arcu nec lorem. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.</p>
<p>Pellentesque elementum mattis odio at consectetur. Maecenas vestibulum arcu eu velit sagittis mollis. Etiam nec quam odio. In laoreet dictum dolor eu rhoncus. Vivamus in lobortis turpis. Fusce luctus commodo diam, quis porta lorem eleifend in. Praesent eget eros risus, at imperdiet elit. Suspendisse velit sapien, dignissim et rhoncus sed, fermentum in arcu. Cras sodales pretium turpis, non convallis massa tincidunt ac. Curabitur sit amet ultrices justo. Proin viverra leo in tortor suscipit pretium. </p>
                <input id="create-new-warning" type="button" value="warning" />
            </div>
        </div>
    </div>
</body>
</html>
